home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / JAVA_ALL / IDE / SUBARTIC / SUB_ARCT / INPUT / WORK_PAI.JAV < prev    next >
Encoding:
Text File  |  1996-10-04  |  2.0 KB  |  70 lines

  1. package sub_arctic.input;
  2.  
  3. /**
  4.  * This is a little holder for two objects. It used by the manager
  5.  * and the work_agent to communicate two objects (the work to do
  6.  * and its argument).
  7.  *
  8.  * @author Ian Smith
  9.  */
  10.  
  11. public class work_pair {
  12.  
  13.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  14.  
  15.   /** The work to do.  */
  16.   protected work_proc _proc;
  17.  
  18.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  19.  
  20.   /**
  21.    * Retrieve the work proc from this pair.
  22.    * @return work_proc the work proc object
  23.    */
  24.   public work_proc proc() { return _proc;}
  25.  
  26.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  27.  
  28.   /** The object to pass to the work proc when it runs.  */
  29.   protected Object _obj;
  30.  
  31.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  32.  
  33.   /**
  34.    * Retrieve the object to be passed to the work proc when it runs.
  35.    * @return Object the object which is to be the work proc's parameter.
  36.    */
  37.   public Object obj() { return _obj;}
  38.  
  39.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  40.  
  41.   /**
  42.    * Create a work pair.
  43.    * @param work_proc proc the procedure to call.
  44.    * @param Object obj the work proc's parameter.
  45.    */
  46.   public work_pair(work_proc proc, Object obj) {
  47.     _obj=obj;
  48.     _proc=proc;
  49.   }
  50.  
  51.   /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
  52.  
  53. }
  54. /*=========================== COPYRIGHT NOTICE ===========================
  55.  
  56. This file is part of the subArctic user interface toolkit.
  57.  
  58. Copyright (c) 1996 Scott Hudson and Ian Smith
  59. All rights reserved.
  60.  
  61. The subArctic system is freely available for most uses under the terms
  62. and conditions described in 
  63.   http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html 
  64. and appearing in full in the lib/interactor.java source file.
  65.  
  66. The current release and additional information about this software can be 
  67. found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
  68.  
  69. ========================================================================*/
  70.